/**
 * 报表设计公司(2011)
 */
package com.reportgear.report.core.cell.painter.impl;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;

import com.reportgear.report.model.cell.Cell;
import com.reportgear.report.model.cell.painter.CellPaintUtils;
import com.reportgear.report.model.cell.painter.CellPainter;
import com.reportgear.report.model.cell.value.salary.SalaryItemObject;
import com.reportgear.report.view.grid.util.PaintUtils;

/**
 * 工资主项目对象绘制器
 * 
 * @version 1.0 2011-3-26
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ANNCSR 2.0
 */
public class SalarItemObjectPainter implements CellPainter {

	@Override
	public void paint(Graphics g, Rectangle rect, Cell cell) {
		SalaryItemObject o = (SalaryItemObject) cell.getValue();

		CellPaintUtils.paintCellStyleString((Graphics2D) g, rect, o.getItem().getName(), cell.getStyle());
	}

}
